﻿
<link href="/App/vendor/jquery.datetimepicker/jquery.datetimepicker.css" rel="stylesheet" />

<div class="panel panel-default padding-empty">
    <div class="panel-body padding-empty">
        <ol class="breadcrumb margin-empty">
            <li class="breadcrumb-color"><i class="fa fa-home"></i>&nbsp;主页</li>
            <li><a href="#/unExpected/planList" class="breadcrumb-link">意外处理</a></li>
            <li class="active">{{baseInfo.planName}} - 意外处理</li>
        </ol>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <!--<h3 class="modal-title">
            {{baseInfo.planName}} - 意外处理
            &nbsp;
            <button class="btn btn-turquoise btn-xs" onclick="javascript:history.go(-1);" title="返回上一页" style="margin-bottom: 0;">
                <i class="fa fa-chevron-left"></i>
            </button>
            &nbsp;
        </h3>-->

        <div class="panel-options">
            <small>
                <label class="control-label">场次：</label>
                <label class="form-control-static">{{baseInfo.sceneName}}</label>
            </small>
        </div>
    </div>

    <div class="panel-body">
        <form class="form-inline">
            <div class="form-group">
                <label class="control-label">考场：</label>
                <select ng-model="curRoom" ng-options="item.examRoomName for item in roomList" class="form-control selectMaxWidth"></select>
            </div>

            <div class="form-group">
                <label class="control-label">科目：</label>
                <select ng-model="curSubject" ng-options="item.subjectName for item in subjectList" class="form-control selectMaxWidth"></select>
            </div>

            <div class="form-group">
                <label class="control-label">考生状态：</label>
                <select ng-model="curStatus" ng-options="item.statusName for item in statusList" class="form-control selectMaxWidth"></select>
            </div>

            <div class="form-group">
                <input ng-model="curParams" class="form-control selectMaxWidth" maxlength="30" placeholder="准考证或姓名" />
            </div>

            &nbsp;
            &nbsp;

            <button class="btn btn-turquoise" ng-click="query();" style="margin-bottom: 0;">
                <i class="fa fa-search"></i>
                搜索
            </button>
        </form>

        <div ng-show="isAdjust" ng-init="isAdjust=false">
            <hr />

            <form class="form-horizontal">
                <div class="form-group">
                    <label for="txtAdjustTime" class="col-sm-2 control-label">调整时间：</label>
                    <div class="col-sm-5">
                        <div class="input-group">
                            <input id="txtAdjustTime" class="form-control datetimepicker" size="50" type="text" readonly="readonly" />
                            <span class="input-group-btn">
                                <button class="btn btn-gray" type="button" onclick="javascript: $('.datetimepicker').val('');">
                                    <i class="glyphicon glyphicon-remove"></i>
                                </button>
                            </span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label for="txtComments" class="col-sm-2 control-label">调整说明：</label>
                    <div class="col-sm-5">
                        <textarea ng-model="curComments" id="txtComments" class="form-control" rows="3" cols="10"></textarea>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-6 col-sm-offset-2">
                        <button class="btn btn-turquoise" ng-click="save();" ng-disabled="loadingState">
                            <i class="fa fa-spinner fa-spin" ng-show="loadingState"></i>
                            <i class="fa fa-check" ng-hide="loadingState"></i>
                            确定
                        </button>
                        <button class="btn btn-gray" ng-click="quit();" ng-disabled="loadingState">
                            <i class="fa fa-close"></i>
                            退出
                        </button>
                    </div>
                </div>
            </form>
        </div>

        <hr />

        <table class="table responsive table-bordered table-hover">
            <thead>
                <tr class="active">
                    <th class="text-center">
                        <input type="checkbox" ng-click="checkAll();" title="全选" />
                    </th>
                    <th>准考证号</th>
                    <th>姓名</th>
                    <th>考试状态</th>
                    <th>考试科目</th>
                    <th>应开考时间</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="item in list" style="cursor: pointer;" ng-click="check(item);">
                    <!--序号-->
                    <td class="text-center">
                        <input type="checkbox" id="cbx_{{item.examineeId}}" value="{{item.examineeId}}" ng-click="check(item);" ng-hide="item.syste==3" ng-disabled="loadingState || item.syste==3" />
                    </td>
                    <!--准考证号-->
                    <td>
                        {{item.cardNo}}
                    </td>
                    <!--姓名-->
                    <td>
                        {{item.examineeName}}
                    </td>
                    <!--考试状态-->
                    <td ng-switch on="item.syste">
                        <span ng-switch-default></span>
                        <span ng-switch-when="0">未开考</span>
                        <span ng-switch-when="1">已登录</span>
                        <span ng-switch-when="2">已开考未交卷</span>
                        <span ng-switch-when="3">已交卷</span>
                    </td>
                    <!--考试科目-->
                    <td title="{{item.subjectName}}">
                        {{item.subjectName | formatLongStr}}
                    </td>
                    <!--应开考时间-->
                    <td>
                        {{item.examStartTime | formatDateNoSs | date: 'yyyy-MM-dd HH:mm'}}
                    </td>
                    <td>
                        <button class="btn btn-turquoise btn-xs" ng-show="item.syste==3" ng-click="applyRetake(item);">
                            申请重考
                        </button>
                    </td>
                </tr>
            </tbody>
        </table>

        <h3 class="text-center" ng-show="list.length <= 0">
            <img src="//openexamcdn.open.com.cn/openexam/static/App/images/nodata.jpg" alt="" />
            <!--<small>对不起，没有相关数据！</small>-->
        </h3>
    </div>
</div>

<script src="//openexamcdn.open.com.cn/openexam/static/App/vendor/jquery.datetimepicker/jquery.datetimepicker.js"></script>

<script>
    $(function () {
        $('.datetimepicker').datetimepicker({
            lang: 'ch',
            step: 5
        });
    });
</script>